#include <iostream>
#include "observatory.h"

using namespace std;

double rek_potens(double x, int n)
{
	if (n <= 0)
		return 1;
	else
		return x * rek_potens(x, n - 1);
}

double potens(double x, int n)
{
	double res = 1;
	for (int i = 0; i < n; i++)
	{
		res *= x;
	}
	return res;
}

void main3_1()
{
	for (double i = 0; i < 5; i++)
	{
		for (int j = 0; j < 5; j++)
		{
			cout << rek_potens(i, j) << " : " << potens(i, j) << " || ";
		}
		cout << endl;
	}

}

void main3_2()
{
	observatory obs;

	cout << "testfil-3.txt" << endl;
	obs.read_from_file("testfil-3.txt");
	obs.print();
	cout << "testfil-10.txt" << endl;
	obs.read_from_file("testfil-10.txt");
	obs.print();
	cout << "testfil-1000.txt" << endl;
	obs.read_from_file("testfil-1000.txt");
	obs.print();
	cout << "testfil-2000.txt" << endl;
	obs.read_from_file("testfil-2000.txt");
	obs.print();
}

int main()
{
	//main3_1();
	main3_2();

	system("pause");
	return 0;
}